package design.patterns.create.factory.method;

public class ClientDemo {

    public static void main(String[] args) {
        //创建一个苹果工厂
        FruitGardener fruitGardener = new AppleGardener();
        Fruit apple = fruitGardener.factory();
        apple.harvest();
        //创建一个葡萄工厂
        FruitGardener fruitGardener2 = new GrapeGardener();
        Fruit grape = fruitGardener2.factory();
        grape.harvest();
    }
}
